<?php
    include_once 'database.php';
    include_once 'session_start.php';
    $query = "DELETE FROM borroweditem WHERE MaterialId =".$_GET["id"]." AND UserId=".$_SESSION["User"]["Id"];
    $db -> query($query);
    
    $action = "Return";
    include 'item_history_db.php';

    $_SESSION["H7_Library_Message"] = "Du fik afleveret materialet tilbage!";
    include_once 'index.php';
?>